package com.koicarp.university.graduate.auth.service;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * @auther liutao
 * @Date 2020-08-17 11:52:44
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class UniversityAuthUser extends User {
    private String userId;

    private String userName;

    private String idCard;

    private String tel;

    private String email;

    private Integer status;

    private String password;

    private String oldPassword;

    private String[] role;

    public UniversityAuthUser(String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }

    public UniversityAuthUser(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
    }
}
